from django.conf.urls import patterns, include, url
import os
ROOT = os.path.dirname(__file__)
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^pyblog/', include('pyblog.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    # url(r'^admin/', include(admin.site.urls)),
    url(r'^$', 'youtu.views.Index', name='youtu_Index'),
    url(r'ueEditorControler','youtu.controller.handler'),
    ( r'^UE/(?P<path>.*)$', 'django.views.static.serve',
            { 'document_root': (ROOT+"/UE").replace('\\','/') }
    ),
    ( r'^upload/(?P<path>.*)$', 'django.views.static.serve',
            { 'document_root': (ROOT+"/upload").replace('\\','/') }
    ),
    url(r'^Index/$', 'youtu.views.Index', name='youtu_Index'), 
    url(r'^Release/$', 'youtu.views.Release', name='youtu_Release'), 
    url(r'^LoginByPwd/$', 'youtu.views.LoginByPwd', name='youtu_LoginByPwd'), 
    url(r'^Manage/$', 'youtu.views.Manage', name='youtu_Manage'), 
    url(r'^About/$', 'youtu.views.About', name='youtu_About'),
    url(r'^Category/([A-Za-z]{1,10})/$','youtu.views.Category',name='youtu_Category'),
    url(r'^Blog/(\d+).html$','youtu.views.Blog',name='youtu_Blog'),
    url(r'^Edit/(\d+)/$','youtu.views.Edit',name='youtu_Edit'),
    url(r'^Admin/([A-Za-z]{1,10})/$','youtu.views.Admin',name='youtu_Admin'),
)
